package com.sky.cloudbabaapplication.controller;

import com.sky.cloudbabaapplication.service.IOrderStockService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderStockController {

    @Resource
    private IOrderStockService orderStockService;

    @RequestMapping("order/{goodId}")
    public String buy(@PathVariable("goodId") Long goodId){
        orderStockService.buy(goodId);
        return "ok";
    }
}
